﻿// Action script...

// [Action in Frame 2]
function intro_end()
{
    function s1()
    {
        _global.bgDarken(1);
        setProperty("", _quality, "high");
        main_mc._visible = false;
        main_mc.gotoAndStop(1);
    } // End of the function
    gs.TweenMax.killTweensOf(mc_bg, 1);
    gs.TweenMax.killTweensOf(stage_bg, 1);
    gs.TweenMax.to(main_mc, 2, {delay: 0, _y: -100, _xscale: 800, _yscale: 800, ease: gs.easing.Cubic.easeIn});
    gs.TweenMax.to(main_mc, 2, {delay: 1, ease: gs.easing.Cubic.easeIn, onComplete: s1});
    gs.TweenMax.to(main_mc, 2, {delay: 1, _alpha: 0});
    gs.TweenMax.to(doodad2, 1, {delay: 2, _y: doodad2._y + 150, _alpha: 0, autoAlpha: 1});
    gs.TweenMax.to(doodad2_bg, 1, {_alpha: 0, ease: Regular.easeOut, autoAlpha: 1});
    doodad2.play();
    if (_global.page == 0)
    {
        setProperty("", _quality, "low");
    } // end if
} // End of the function
function showNav_main()
{
    function s1()
    {
        if (_global.page != 0)
        {
            navMain_mc.gotoAndStop(2);
            navMain_mc._alpha = 100;
            navMain_mc._xscale = 100;
            navMain_mc._yscale = 100;
            gs.TweenMax.from(navMain_mc, 3, {_alpha: 0, _xscale: 40, _yscale: 40, ease: gs.easing.Back.easeOut});
            gs.TweenMax.killDelayedCallsTo(s1);
        } // end if
    } // End of the function
    gs.TweenMax.killDelayedCallsTo(s1);
    gs.TweenMax.delayedCall(2, s1);
} // End of the function
function btnAddaction_home(btn)
{
    btn.onRelease = function ()
    {
        this.i = 0;
        gs.TweenMax.killDelayedCallsTo(showNav_main);
        if (_global.page != this.i)
        {
            if (this.i != 0)
            {
                gs.TweenMax.delayedCall(3, loadPage, [this.i]);
            }
            else
            {
                load_mc._alpha = 100;
                gs.TweenMax.delayedCall(0, loadPage, [this.i]);
            } // end else if
            if (_global.page == 0)
            {
                gs.TweenMax.delayedCall(0, showNav_main, [this.i]);
            } // end if
            trace ("this.i onRelease: " + this.i);
            main_mc.sl0.doors.play();
            _global.page = this.i;
            mb.broadcastMessage("onPageChange");
            _global.nav = undefined;
        } // end if
        if (_global.page == 0)
        {
        } // end if
    };
} // End of the function
function roll(min, max)
{
    var _loc1 = Math.floor(Math.random() * (max - min + 1)) + min;
    return (_loc1);
} // End of the function
function tileBG(val)
{
    tile_width = 266;
    tile_height = 363;
    x_max = Math.ceil(Stage.width / tile_width);
    y_max = Math.ceil(Stage.height / tile_height);
    if (val == 1)
    {
        for (x = 0; x <= x_max; x++)
        {
            for (y = 0; y <= y_max; y++)
            {
                bg = _root.bgTiled.attachMovie("square", "bg" + x + y, _root.bgTiled.getNextHighestDepth());
                bg._x = tile_width * x;
                bg._y = tile_height * y;
            } // end of for
        } // end of for
    }
    else
    {
        for (a in _root.bgTiled)
        {
            removeMovieClip (_root.bgTiled[a]);
        } // end of for...in
    } // end else if
} // End of the function
function navRefresh()
{
} // End of the function
function updateCoord()
{
    xm = Stage.width / 2;
    ym = Stage.height / 2;
} // End of the function
function adjObjects()
{
    function adj(mc)
    {
        mc._x = xm;
        mc._y = ym;
    } // End of the function
    adj(main_mc);
    adj(mc_bg);
    stage_bg._width = Stage.width;
    stage_bg._height = Stage.height;
    navFooter_mc._x = Math.ceil(Stage.width - 10);
    load_mc._x = 0;
    load_mc._y = Stage.height / 2 - 380;
    navHeader_mc._x = 10;
    navHeader_mc._y = Stage.height / 2 - 245;
    btnOverlap._width = Stage.width;
    btnOverlap._height = Stage.height;
    btnOverlap._x = 0;
    btnOverlap._y = 0;
    preloader_mc._x = Stage.width / 2;
    preloader_mc._y = Stage.height / 2;
    if (_global.page != 0)
    {
    } // end if
    i = 0;
    for (var _loc2 in _global.pages)
    {
        _global.pages[i]._x = Stage.width / 2;
        _global.pages[i]._y = Stage.height / 2;
        i = i + 1;
    } // end of for...in
    i = 0;
    for (var _loc2 in _global.pops)
    {
        _global.pops[i]._x = Stage.width / 2;
        _global.pops[i]._y = Stage.height / 2;
        i = i + 1;
    } // end of for...in
    if (_global.page == 2)
    {
        load_mc.bg._width = Stage.width;
        load_mc.mask_mc._x = Stage.width / 2;
        load_mc.story_mc._x = Stage.width / 2;
    }
    else if (_global.page == 1 || _global.page == 3)
    {
        load_mc.bg._width = Stage.width;
        load_mc.desc_mc._x = xm + load_mc.desc_mc._width / 2;
        load_mc.txt1._x = Stage.width / 2 - load_mc.txt1._width / 2;
        load_mc.content_mc.mask._width = Stage.width;
        load_mc.content_mc.shad._width = Stage.width;
        load_mc.content_mc.meuScroll.bg._height = Stage.width + 80;
        load_mc.content_mc.meuScroll.barra._y = 0;
        load_mc.follow_mc._x = Stage.width / 2;
        load_mc.drag_btn._x = Stage.width / 2;
    } // end else if
    doodad0._y = ym + 125;
    doodad1._y = ym + 125;
    doodad1._x = Stage.width;
    doodad2._x = xm + 10;
    doodad2._y = ym + 88;
    doodad2_bg._x = xm;
    doodad2_bg._y = ym;
    t = Math.ceil(Stage.height - 48);
    if (Stage.width < 1024)
    {
        gs.TweenMax.to(navMain_mc.logo, 1, {_xscale: 70, _yscale: 70});
        gs.TweenMax.to(navMain_mc, 1, {_x: Stage.width - 330});
    }
    else
    {
        gs.TweenMax.to(navMain_mc.logo, 1, {_xscale: 100, _yscale: 100});
        gs.TweenMax.to(navMain_mc, 1, {_x: Stage.width - 450});
    } // end else if
    gs.TweenMax.to(navMain_mc, 1, {_y: t});
} // End of the function
function scaleUp(mc)
{
    ss = 70;
    mc._xscale = ss;
    mc._yscale = ss;
    gs.TweenMax.to(mc, 3, {_xscale: 100, _yscale: 100, ease: gs.easing.Back.easeOut});
} // End of the function
function navHome(val, del)
{
    trace ("navHome: " + val);
    easeType = gs.easing.Back.easeOut;
    if (val == 1)
    {
        navHome_mc._xscale = 0;
        navHome_mc._yscale = 0;
        navHome_mc._alpha = 0;
        navHome_mc._x = 0;
        navHome_mc._y = 0;
        gs.TweenMax.to(navHome_mc, 2, {delay: del, _xscale: 100, _yscale: 100, _alpha: 100, ease: easeType});
    }
    else if (val == 2)
    {
        gs.TweenMax.from(navHome_mc, 2, {delay: del, _xscale: 100, _yscale: 100, _alpha: 100, ease: easeType});
    }
    else
    {
        gs.TweenMax.to(navHome_mc, 2, {delay: del, _xscale: 0, _yscale: 0, _alpha: 0, ease: easeType});
    } // end else if
} // End of the function
function navSet(val)
{
    if (val == 1)
    {
        _global.nav = 1;
    }
    else if (val == undefined)
    {
        _global.nav = undefined;
    } // end else if
} // End of the function
function intro()
{
    function dooropen()
    {
        doors.play();
    } // End of the function
    main_mc.gotoAndStop(2);
    setProperty("", _quality, "high");
    doodad2._x = xm + 10;
    doodad2._y = ym + 88;
    doodad2_bg._x = xm;
    doodad2_bg._y = ym;
    doodad2.gotoAndStop(1);
    doodad2._alpha = 0;
    doodad2_bg._alpha = 0;
    gs.TweenMax.to(doodad2, 3, {_alpha: 100, ease: gs.easing.Strong.easeOut, autoAlpha: 100});
    gs.TweenMax.to(doodad2_bg, 3, {delay: 1, _alpha: 100, ease: gs.easing.Strong.easeOut, autoAlpha: 100});
    _global.bgDarken(2, 0);
    gs.TweenMax.from(main_mc, 1, {colorMatrixFilter: {brightness: 1}});
    scaleUp(main_mc);
    _global.bgDarken(1, 2.500000);
    doors = main_mc.sl0.doors;
    doors.gotoAndStop(1);
    gs.TweenMax.delayedCall(0.500000, dooropen, [], true);
    _global.navHome_init(_global.btn, _global.btn_mc);
    _global.nav = 1;
    _global.page = 0;
    main_mc._visible = true;
    main_mc._alpha = 100;
    mc._xscale = 100;
    mc._yscale = 100;
    main_mc._y = 349;
    adjObjects();
    scaleUp(main_mc.sl0.vinesleft);
    scaleUp(main_mc.sl0.vinesright);
} // End of the function
function loadPage(val)
{
    function s1()
    {
        trace ("unloading previous clip");
        mcLoader.unloadClip(load_mc);
    } // End of the function
    var _loc3 = new Object();
    _loc3.onLoadStart = function (target_mc)
    {
        _root.attachMovie("loader", "loader_mc", _root.getNextHighestDepth());
        loader_mc._x = Stage.width / 2;
        loader_mc._y = Stage.height / 2;
        adjObjects();
    };
    _loc3.onLoadProgress = function (target_mc, bytesLoaded, bytesTotal)
    {
        function s3()
        {
            gs.TweenMax.to(doodad0, 1, {_alpha: 80});
            removeMovieClip (_root.loader_mc);
        } // End of the function
        getLoaded = Math.ceil(bytesLoaded / bytesTotal * 100);
        if (getLoaded == 100)
        {
            loader_mc.loaded_txt.text = "";
            gs.TweenMax.to(loader_mc, 1, {_alpha: 0, onComplete: s3});
        } // end if
    };
    _loc3.onLoadComplete = function (target_mc, httpStatus)
    {
        removeMovieClip (_root.preloader_mc);
        _global.xmlPath = _global.mainPath + xmlfile;
        load_mc.gotoAndStop(2);
        adjObjects();
    };
    mclListener.onLoadInit = function (target_mc)
    {
        trace ("onLoadInit");
    };
    var mcLoader = new MovieClipLoader();
    mcLoader.addListener(_loc3);
    var xmlfile;
    if (val == undefined || val == 0)
    {
        mc = undefined;
        xmlfile = undefined;
        gs.TweenMax.to(load_mc, 0.500000, {_alpha: 0, onComplete: s1, colorMatrixFilter: {brightness: -2}});
    }
    else if (val == 2)
    {
        mc = "story.swf";
        mcLoader.loadClip(mc, load_mc);
        gs.TweenMax.to(load_mc, 0.500000, {_alpha: 100, colorMatrixFilter: {brightness: 1}});
    }
    else
    {
        switch (_global.page)
        {
            case 1:
            {
                mc = "gallery.swf";
                xmlfile = "get_collections.php?year=" + _global.curYear;
                break;
            } 
            case 2:
            {
                mc = "story.swf";
                xmlfile = undefined;
                break;
            } 
            case 3:
            {
                mc = "gallery.swf";
                xmlfile = "get_galleries.php?year=" + _global.curYear;
                trace ("xmlfile: " + xmlfile);
                break;
            } 
        } // End of switch
        if (xmlfile != undefined)
        {
            mcLoader.loadClip(mc, load_mc);
        } // end if
        gs.TweenMax.to(load_mc, 0.500000, {_alpha: 100, colorMatrixFilter: {brightness: 1}});
    } // end else if
} // End of the function
function loadPop(mc, val)
{
    function inv(mc)
    {
        mc._visible = false;
    } // End of the function
    btnOverlap._visible = false;
    if (val == 1)
    {
        btnOverlap._visible = true;
        mc._visible = true;
        mc._alpha = 0;
        gs.TweenMax.to(mc, 1, {_alpha: 100, ease: gs.easing.Strong.easeOut});
    }
    else if (val == 0)
    {
        btnOverlap._visible = false;
        mc._alpha = 100;
        gs.TweenMax.to(mc, 1, {_alpha: 0, ease: gs.easing.Strong.easeOut, onComplete: inv, onCompleteParams: [mc]});
    } // end else if
} // End of the function
function init()
{
    updateCoord();
    navFooter_mc.jukebox_mc.play();
    btnAddaction_home(navHeader_mc.btn);
    navHeader_mc._alpha = 0;
    intro();
    loadPage();
    doodad0._visible = false;
    doodad0._alpha = 0;
    doodad0._y = ym + 125;
    doodad2_bg._alpha = 0;
    doodad2._alpha = 0;
    doodad2.gotoAndStop(1);
    dfly_mc0._x = xm - 330;
    dfly_mc0._y = ym - 200;
    dfly_mc1._x = xm - 220;
    dfly_mc1._y = ym - 150;
} // End of the function
function fancy1(mc)
{
    function f1(mc)
    {
        gs.TweenMax.to(mc, 2, {colorMatrixFilter: {saturation: 1, brightness: 1}, glowFilter: {alpha: 0, blurX: 30, blurY: 30, color: 11641090, strength: 0}});
    } // End of the function
    gs.TweenMax.to(mc, 3, {delay: 4.500000, colorMatrixFilter: {saturation: 3, brightness: 2}, glowFilter: {alpha: 20, blurX: 30, blurY: 30, color: 11641090, strength: 1}, onComplete: f1, onCompleteParams: [mc]});
} // End of the function
function fancy2(mc)
{
    gs.TweenMax.to(mc, 6, {loop: 0, _rotation: 360, ease: gs.easing.Linear.easeInOut});
    gs.TweenMax.to(mc, 3, {yoyo: 0, ease: gs.easing.Linear.easeInOut, glowFilter: {alpha: 20, blurX: 30, blurY: 30, color: 11641090, strength: 1}});
} // End of the function
stop ();
System.security.allowDomain("http://www.mailam.com.vn");
Stage.align = "TL";
Stage.showMenu = false;
Stage.scaleMode = "noScale";
_global.blossomShow = function (mc)
{
    i = 0;
    ss = 10;
    dd = 0;
    easeType = Regular.easeOut;
    for (var _loc7 in mc)
    {
        gs.TweenMax.from(mc[i], 1, {_alpha: 0, delay: dd, _xscale: ss, _yscale: ss, ease: easeType});
        i = i + 1;
        dd = dd + 0.100000;
    } // end of for...in
};
_global.lightsShow = function (mc)
{
    i = 0;
    ss = 10;
    dd = 0;
    easeType = Regular.easeOut;
    for (var _loc8 in mc)
    {
        gs.TweenMax.from(mc[i], 1, {yoyo: 0, _alpha: 0, delay: dd, _xscale: ss, _yscale: ss, ease: easeType});
        i = i + 1;
        dd = dd + 0.100000;
    } // end of for...in
};
_global.navHome_refresh = function (mc, mc1, mc2)
{
    i = 0;
    ss = 80;
    dd = 0;
    easeType = gs.easing.Back.easeOut;
    for (var _loc13 in mc)
    {
        if (_global.page == 0)
        {
            mc[i]._alpha = 0;
            mc[i]._xscale = 0;
            mc[i]._yscale = 0;
            mc[i].txt._alpha = 0;
        } // end if
        if (_global.page != i)
        {
            mc[i].setDepthTo(mx.managers.DepthManager.kTop);
            gs.TweenMax.to(mc[i], 2, {_alpha: ss, delay: dd, _xscale: ss, _yscale: ss, ease: easeType});
            gs.TweenMax.to(mc[i], 1, {colorMatrixFilter: {brightness: 0.400000}, onComplete: navSet, onCompleteParams: [1]});
        }
        else
        {
            mc[i].txt._rotation = -90;
            mc[i].setDepthTo(mx.managers.DepthManager.kBottom);
            gs.TweenMax.to(mc[i], 2, {_alpha: 100, delay: dd, _xscale: 100, _yscale: 100, ease: easeType});
            gs.TweenMax.to(mc[i], 1, {_xscale: 100, _yscale: 100, colorMatrixFilter: {brightness: 1}});
            gs.TweenMax.to(mc[_global.page].txt, 1, {delay: 1, _rotation: -20, ease: gs.easing.Elastic.easeOut, _alpha: 100});
            mc[_global.page].setDepthTo(mx.managers.DepthManager.kTop);
        } // end else if
        ++i;
    } // end of for...in
};
_global.navHome_init = function (mc, mc1)
{
    i = 0;
    ss = 80;
    dd = 0;
    easeType = gs.easing.Back.easeOut;
    for (var _loc15 in mc)
    {
        mc1[i].i = i;
        mc[i]._alpha = 0;
        mc[i]._xscale = 0;
        mc[i]._yscale = 0;
        mc[i].txt._alpha = 0;
        if (_global.page != i)
        {
            mc[i].setDepthTo(mx.managers.DepthManager.kBottom);
            gs.TweenMax.to(mc[i], 2, {_alpha: ss, delay: dd, _xscale: ss, _yscale: ss, ease: easeType});
            gs.TweenMax.to(mc[i], 1, {colorMatrixFilter: {brightness: 0}, onComplete: navSet, onCompleteParams: [1]});
        }
        else
        {
            mc[i].setDepthTo(mx.managers.DepthManager.kTop);
            mc[this.i].txt._rotation = -90;
            trace (mc[i].f);
            gs.TweenMax.to(mc[i], 2, {_alpha: 100, delay: dd, _xscale: 100, _yscale: 100, ease: easeType});
            gs.TweenMax.to(mc[i], 1, {_xscale: 100, _yscale: 100, colorMatrixFilter: {brightness: 1}});
            gs.TweenMax.to(mc[i].txt, 1, {delay: 1, _rotation: -20, ease: gs.easing.Elastic.easeOut, _alpha: 100});
            mc[_global.page].setDepthTo(mx.managers.DepthManager.kTop);
        } // end else if
        mc1[i].onRollOver = function ()
        {
            if (_global.page != this.i)
            {
                mc[this.i].setDepthTo(mx.managers.DepthManager.kTop);
                gs.TweenMax.to(mc[this.i].txt, 1, {_rotation: -20, ease: gs.easing.Elastic.easeOut, _alpha: 100});
                gs.TweenMax.to(mc[this.i], 1, {_alpha: 100, colorMatrixFilter: {brightness: 1}, _xscale: 100, _yscale: 100, ease: gs.easing.Back.easeOut});
                _root.mb.broadcastMessage("navActive", mc[_global.page], 0);
            } // end if
        };
        mc1[i].onRelease = function ()
        {
            gs.TweenMax.killDelayedCallsTo(showNav_main);
            if (_global.page != this.i)
            {
                if (this.i != 0)
                {
                    gs.TweenMax.delayedCall(3, loadPage, [this.i]);
                }
                else
                {
                    load_mc._alpha = 100;
                    gs.TweenMax.delayedCall(0, loadPage, [this.i]);
                } // end else if
                if (_global.page == 0)
                {
                    gs.TweenMax.delayedCall(0, showNav_main, [this.i]);
                } // end if
                trace ("this.i onRelease: " + this.i);
                main_mc.sl0.doors.play();
                _global.page = this.i;
                mb.broadcastMessage("onPageChange");
                _global.nav = undefined;
            } // end if
            if (_global.page == 0)
            {
            } // end if
        };
        mc1[i].onPress = function ()
        {
            gs.TweenMax.to(mc[this.i], 2, {_xscale: 90, _yscale: 90, ease: gs.easing.Elastic.easeOut});
        };
        mc1[i].onRollOut = function ()
        {
            if (_global.page != this.i)
            {
                mc[this.i].setDepthTo(mx.managers.DepthManager.kBottom);
                gs.TweenMax.to(mc[this.i].txt, 1, {_rotation: -90, ease: gs.easing.Strong.easeOut, _alpha: 0});
                gs.TweenMax.to(mc[this.i], 1, {colorMatrixFilter: {brightness: 0}, _xscale: 80, _yscale: 80, ease: gs.easing.Strong.easeOut});
                _root.mb.broadcastMessage("navActive", mc[_global.page], 1);
            } // end if
        };
        i = i + 1;
        dd = dd + 0.300000;
    } // end of for...in
};
_global.navIdle = function (mc)
{
    i = 0;
    for (var _loc12 in mc)
    {
        gs.TweenMax.to(mc[i].f, 6, {loop: 0, _rotation: 360, ease: gs.easing.Linear.easeInOut});
        gs.TweenMax.to(mc[i].f, 3, {yoyo: 0, ease: gs.easing.Linear.easeInOut, glowFilter: {alpha: 20, blurX: 30, blurY: 30, color: 11641090, strength: 1}});
        i = i + 1;
    } // end of for...in
};
_global.navIdle(_global.btn);
_global.mainPath = "";
_global.posted = undefined;
mb = {};
resListener = {};
pageListener = {};
bgListener = {};
stagebgListener = {};
navListener = {};
AsBroadcaster.initialize(mb);
Stage.addListener(resListener);
mb.addListener(bgListener);
mb.addListener(stagebgListener);
mb.addListener(pageListener);
mb.addListener(navListener);
resListener.onResize = function ()
{
    updateCoord();
    adjObjects();
};
navListener.navActive = function (mc, val)
{
    if (val == 0)
    {
        gs.TweenMax.to(mc.txt, 1, {_rotation: -90, ease: gs.easing.Strong.easeOut, _alpha: 0});
        gs.TweenMax.to(mc, 1, {colorMatrixFilter: {brightness: 0.500000}, _xscale: 80, _yscale: 80, ease: gs.easing.Strong.easeOut});
    }
    else if (val == 1)
    {
        gs.TweenMax.to(mc.txt, 1, {_rotation: -20, ease: gs.easing.Elastic.easeOut, _alpha: 100});
        gs.TweenMax.to(mc, 1, {blurFilter: {blurX: 0, blurY: 0, strength: 0}, colorMatrixFilter: {brightness: 1}, _xscale: 100, _yscale: 100, ease: gs.easing.Back.easeOut});
    } // end else if
};
pageListener.onPageChange = function ()
{
    function s1()
    {
        navMain_mc.gotoAndStop(1);
    } // End of the function
    navHeader_mc.gotoAndStop(_global.page + 1);
    var _loc2;
    switch (_global.page)
    {
        case 1:
        {
            _loc2 = "COLLECTIONS";
            break;
        } 
        case 2:
        {
            _loc2 = "MAI\'S STORY";
            break;
        } 
        case 3:
        {
            _loc2 = "MEDIA";
            break;
        } 
    } // End of switch
    gs.TweenMax.to(load_mc, 1, {_alpha: 0});
    navHeader_mc.sub1_txt.text = _loc2;
    if (_global.page == 0)
    {
        gs.TweenMax.to(navHeader_mc, 1, {_alpha: 0});
        gs.TweenMax.to(navMain_mc, 1, {_alpha: 0, onComplete: s1});
        trace ("main_mc._visible: " + main_mc._visible);
        if (main_mc._visible == false)
        {
            intro();
        } // end if
        gs.TweenMax.to(doodad0, 1, {_alpha: 0, ease: gs.easing.Cubic.easeOut, autoAlpha: 0});
        gs.TweenMax.to(doodad0, 1, {colorMatrixFilter: {contrast: 1}});
        gs.TweenMax.to(doodad1, 1, {_alpha: 0, ease: gs.easing.Cubic.easeOut, autoAlpha: 0});
    }
    else
    {
        intro_end();
        gs.TweenMax.to(navHeader_mc, 1, {delay: 2, _alpha: 100});
        gs.TweenMax.to(navMain_mc, 1, {_alpha: 100});
        doodad0._visible = true;
        doodad1._visible = true;
        gs.TweenMax.to(doodad0, 1, {delay: 2, _alpha: 100, ease: gs.easing.Cubic.easeOut});
        gs.TweenMax.to(doodad0, 1, {colorMatrixFilter: {contrast: 1}});
        gs.TweenMax.to(doodad1, 1, {delay: 1, _alpha: 50, ease: gs.easing.Cubic.easeOut});
    } // end else if
};
var xm = Stage.width / 2;
var ym = Stage.height / 2;
var darken = 1;
var curDate = new Date();
_global.curYear = "";
trace ("_global.curYear: " + _global.curYear);
_global.nav = 1;
_global.page = 0;
_global.pages = new Array(pp0, pp1, pp2);
_global.pops = new Array(pop0, pop1);
pop0._visible = false;
pop1._visible = false;
btnOverlap.useHandCursor = false;
btnOverlap._visible = false;
easeType = gs.easing.Strong.easeOut;
_global.bgDarken = function (darken, del)
{
    if (del == undefined)
    {
        del = 0;
    } // end if
    if (darken == 1)
    {
        gs.TweenMax.to(stage_bg, 3, {delay: del, ease: Regular.easeOut, colorMatrixFilter: {brightness: 0.700000}});
        darken = undefined;
    }
    else if (darken == 0)
    {
        gs.TweenMax.to(stage_bg, 3, {delay: del, ease: Regular.easeOut, colorMatrixFilter: {brightness: 0}});
        darken = undefined;
    }
    else if (darken == 2)
    {
        gs.TweenMax.to(stage_bg, 3, {delay: del, ease: Regular.easeOut, colorMatrixFilter: {brightness: 1}});
        gs.TweenMax.to(main_mc, 1, {delay: del, ease: Regular.easeOut, colorMatrixFilter: {brightness: 1}});
        darken = undefined;
    } // end else if
};
init();
